<?php
$section = 'User';
if(!isset($_SESSION))
    session_start();

if(isset($_SESSION['user'])):
    header("Location: ../index.php");
else:
?>
<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <title>Login</title>
    <link rel="stylesheet" type="text/css" href="../css/reset.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
  </head>

  <body class="small login">
    <form action='login.php' method='POST'>
      <table>
        <thead>
          <tr>
            <th colspan="2">Existing Customers</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Login ID:</td>
            <td><input type="text" name="email" /></td>
          </tr>
          <tr>
            <td>Password:</td>
            <td><input type="password" name="password" /></td>
          </tr>
        </tbody>
        <tfoot>
          <tr>
            <td colspan="2">
              <input type="submit" name="login" value="Log in" />
            </td>
          </tr>
        </tfoot>
      </table>
    </form>
    <br />
    <form action="" method="GET">
      <table>
        <thead>
          <th>New Customer Signup</th>
        </thead>
        <tfoot>
          <td>
            <input type="submit" value="Register" />
          </td>
        </tfoot>
      </table>
    </form>
    <br />
    <p class="small center"><a href="../index.php">Return to index.</a></p>
  </body>
</html>
<?php endif; ?>
